import React from 'react';
import UserMessage from './UserMessage.js';

class Dialog extends React.Component{

	constructor(props){
		super(props);
	}
	render(){
		return (
				<div>
					<fieldset>
						 <legend>{this.props.title}:{this.props.message}</legend>
						 <div>
						 	{this.props.children}
						 </div>
						 <button type="button" onClick = {(e)=>{this.props.buttonClickHandler('确定')}}>{this.props.buttonTitle}</button>
					</fieldset>
				</div>
			);
	}
}
export default Dialog;